package com.arm.system.service.impl;

import java.util.List;
import com.arm.common.utils.DateUtils;
import com.arm.system.domain.ArmArmedinfo;
import com.arm.system.domain.vo.ArmArmedinfoVo;
import com.arm.system.mapper.ArmArmedinfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.arm.system.service.IArmArmedinfoService;

/**
 * 装备记录Service业务层处理
 * 
 * @author arm
 * @date 2023-11-06
 */
@Service
public class ArmArmedinfoServiceImpl implements IArmArmedinfoService 
{
    @Autowired
    private ArmArmedinfoMapper armArmedinfoMapper;

    /**
     * 查询装备记录
     * 
     * @param id 装备记录主键
     * @return 装备记录
     */
    @Override
    public ArmArmedinfo selectArmArmedinfoById(Long id)
    {
        return armArmedinfoMapper.selectArmArmedinfoById(id);
    }

    /**
     * 查询装备记录列表
     * 
     * @param armArmedinfo 装备记录
     * @return 装备记录
     */
    @Override
    public List<ArmArmedinfo> selectArmArmedinfoList(ArmArmedinfo armArmedinfo)
    {
        return armArmedinfoMapper.selectArmArmedinfoList(armArmedinfo);
    }

    /**
     * 查询装备记录列表
     *
     * @param armArmedinfo 装备记录
     * @return 装备记录
     */
    @Override
    public List<ArmArmedinfoVo> selectArmArmedinfoVoList(ArmArmedinfo armArmedinfo)
    {
        return armArmedinfoMapper.selectArmArmedinfoVoList(armArmedinfo);
    }

    /**
     * 新增装备记录
     * 
     * @param armArmedinfo 装备记录
     * @return 结果
     */
    @Override
    public int insertArmArmedinfo(ArmArmedinfo armArmedinfo)
    {
        armArmedinfo.setCreateTime(DateUtils.getNowDate());
        return armArmedinfoMapper.insertArmArmedinfo(armArmedinfo);
    }

    /**
     * 修改装备记录
     * 
     * @param armArmedinfo 装备记录
     * @return 结果
     */
    @Override
    public int updateArmArmedinfo(ArmArmedinfo armArmedinfo)
    {
        armArmedinfo.setUpdateTime(DateUtils.getNowDate());
        return armArmedinfoMapper.updateArmArmedinfo(armArmedinfo);
    }

    /**
     * 批量删除装备记录
     * 
     * @param ids 需要删除的装备记录主键
     * @return 结果
     */
    @Override
    public int deleteArmArmedinfoByIds(Long[] ids)
    {
        return armArmedinfoMapper.deleteArmArmedinfoByIds(ids);
    }

    /**
     * 删除装备记录信息
     * 
     * @param id 装备记录主键
     * @return 结果
     */
    @Override
    public int deleteArmArmedinfoById(Long id)
    {
        return armArmedinfoMapper.deleteArmArmedinfoById(id);
    }
}
